type fun = (data?: any) => void